.PHONY: test integration-test

buildDir 			?= ./target
codegenBinary 		?= ${GOPATH}/bin/oapi-codegen
generatedSourcesDir := $(buildDir)/generated-sources

clean:
	$(info '[$(CURDIR)] cleaning $(buildDir)')
	@rm -rdf $(buildDir)

# if running from workspace Makefile, than we can skip clean (target dependencies is managed by workspace)
generate-sources: $(if $(workspaceMode),,clean)
	$(info '[$(CURDIR)] generating sources at $(generatedSourcesDir) with $(codegenBinary)')
	@mkdir -p $(generatedSourcesDir) && $(codegenBinary) -package generated -o $(generatedSourcesDir)/rest.go rest.yaml

build:
	$(info '[$(CURDIR)] nothing to build')

test:
	$(info '[$(CURDIR)] nothing to test')

integration-test:
	$(info '[$(CURDIR)] nothing to integration-test')

release:
	$(info '[$(CURDIR)] nothing to release')